﻿@{
    Layout = null;

}
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=7" />
    <title>@EnterpriseFund.Common.GlobalConstant.CONSTRING_SYSTITLE</title>
    @Html.DevExpress().GetStyleSheets(
        new StyleSheet { ExtensionType = ExtensionType.Splitter, Theme = DevExpressHelper.Theme }

)
    @Html.DevExpress().GetScripts(
            new Script { ExtensionType = ExtensionType.Splitter }
    )
 
    <link href="@Url.Content("~/Content/Site.css", true)" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery.min.js", true)" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/json2.js", true)" type="text/javascript"></script>

    <script src="@Url.Content("~/Scripts/checkinput.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Common/GetRootPath.ashx", true)" type="text/javascript"></script>
  
    <script>
//        $(document).ready(function () {
//            getRemind();
//        });
        function LogExit() {
            if (confirm("确定退出吗?")) {
                window.location.href = rootPath + "/Index/LogExit";

            }
            else {
                return false;
            }
        }

        function onClicks() {
            parent.contentframe.toZm();
        }


        function outputhtml() {
            //   var hm='';
            //      $("#themediv").html(hm);


        }

        function ValueChanged(obj) {
            $.ajax({
                type: 'POST',
                url: rootPath + "/Index/SetYear",
                data: { year: obj.options[obj.selectedIndex].value },
                success: function (result) {
                    if (result == "ok") {
                        window.location.reload();
                    }
                }
            });
        }

        function getRemind() {
            $.ajax({
                type: 'POST',
                url: rootPath + '/Index/GetRemindListMsg',
                success: function (jsonstr) {
                    var data = jsonstr;
                    if (data != "") {
                        var msg = new String(data);
                        var index = msg.indexOf("#");
                        var msgCount = msg.substring(0, index);
                        if (msgCount != 0) {
                            var popupZone = ASPxClientPopupControl.Cast("popupZone");
                            if (msgCount == 20) {
                                msgCount = 20; //最大20条
                            }
                            popupZone.SetHeight(msgCount * 15 + msgCount * 15); //加上<br/>间隔
                            popupZone.SetWidth(300);
                            var content = msg.substring(index + 1);
                            writeEvent(content);
                        }
                    }
                    else {
                        var popupZone = ASPxClientPopupControl.Cast("popupZone");
                        popupZone.Hide();
                    }
                    window.setTimeout("getRemind()", 60000);
                }
            });


        }
        /*消息输出*/
        function writeEvent(eventLog) {
            var popupZone = ASPxClientPopupControl.Cast("popupZone");
            popupZone.Hide();
            popupZone.SetContentHTML(eventLog);
            var left = window.screen.width;
            var top = screen.height + popupZone.GetHeight()
            popupZone.SetHeaderText("消息提醒");

            popupZone.ShowAtPos(left, top);
            popupZone.UpdatePosition();

        }

        function Dlg() {
            window.showModalDialog(rootPath + "/MessageDlg/MessageLook");
            popupZone.Hide();
        }

        function MenuTop_emClick(source, e) {
            switch (e.item.name) {

                case "theme":
                    {

                        $.ajax({
                            type: 'POST',
                            url: rootPath + "/Index/SetTheme",
                            data: { tem: e.item.GetText() },
                            success: function (result) {
                                if (result == "ok") {
                                    window.location.reload();
                                }
                            }
                        });
                        //                        $.ajax({
                        //                            type: 'POST',
                        //                            url: rootPath + '/QueryAllowance/SetTheme',
                        //                            data: { pdata: e.item.GetText() },
                        //                            success: function (result) {
                        //                                //
                        //                                if (result = "ok") {
                        //                                    alert("1");
                        //                                    parent.location.reload();
                        //                                }
                        //                            }
                        //                        });
                        //  window.location.href = rootPath + "/QueryAllowance?t=" + e.item.GetText();
                        break;
                    }
            }
        }
    </script>
</head>
<body>
 @Html.DevExpress().PopupControl(
    settings =>
    {
        settings.Name = "popupZone";
        settings.Width = 300;
        settings.Height = 200;
        settings.AllowDragging = false;
        settings.ShowShadow = false;
        //settings.Top = 800;
        settings.CloseAction = CloseAction.CloseButton;
        settings.EnableAnimation = false;
        settings.HeaderText = "提醒消息";
        settings.Modal = false;
        settings.EnableClientSideAPI = true;
        settings.ClientSideEvents.Init = "getRemind";
        //settings.PopupHorizontalAlign = PopupHorizontalAlign.OutsideRight;
        //settings.PopupVerticalAlign = PopupVerticalAlign.TopSides;
        settings.ShowFooter = false;
      
    }).GetHtml()


    @Html.DevExpress().Splitter(settings =>
{

    settings.Name = "MainSplitter";
    settings.AllowResize = false;
    settings.Orientation = System.Web.UI.WebControls.Orientation.Vertical;
    settings.FullscreenMode = true;
    settings.SeparatorVisible = false;
    settings.Height = System.Web.UI.WebControls.Unit.Percentage(100);
    settings.Width = System.Web.UI.WebControls.Unit.Percentage(100);
    settings.Styles.Pane.Border.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(0);
    settings.Styles.Pane.Paddings.Padding = System.Web.UI.WebControls.Unit.Pixel(0);
  
    settings.Panes.Add(pane =>
    {
        pane.Name = "Header";
        pane.Size = System.Web.UI.WebControls.Unit.Pixel(40);
        pane.MinSize = System.Web.UI.WebControls.Unit.Pixel(40);
      //  pane.PaneStyle.BackColor = DevExpress.Skins.
      //  pane.PaneStyle.BackColor = System.Drawing.Color.Black;
      //  pane.PaneStyle.BackgroundImage.ImageUrl =  EnterpriseFund.Common.OperateSession.compressurl(Url.Content("~/App_Themes/"+EnterpriseFund.Common.OperateSession.GetFromCacheRequest("CurrentUserTheme").ToString()+"/Web/mItemBack.gif"));
       // pane.PaneStyle.BackgroundImage.ImageUrl = EnterpriseFund.Common.OperateSession.compressurl(Url.Content("~/App_Themes/" + EnterpriseFund.Common.OperateSession.GetFromCacheRequest("CurrentUserTheme").ToString() + "/Web/mItemSBack.gif"));
        pane.PaneStyle.BackgroundImage.ImageUrl = Html.ViewContext.Controller.ViewData["themepic"].ToString();
        pane.PaneStyle.BorderBottom.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(1);
       pane.PaneStyle.BackgroundImage.Repeat = BackgroundImageRepeat.Repeat;
               
        pane.PaneStyle.CssClass = "BodyBackColor";
        // pane.ContentUrl = Url.Action("Top", "Index");
        pane.SetContent(() =>
        {
            ViewContext.Writer.Write(
                @"<table width='100%' cellpadding='0' cellspacing='0' style='background-position: 0px; overflow: visible;'>
        <tr>
            <td width='40%' height='40' valign='top'>
                <img src='" + Url.Content("~/Content/images/headercx.png", true) + @"' width='152' height='42' />
            </td>
            <td align='center' width='10%' valign='top' height='40'>
               <table width='100'  cellpadding='0' cellspacing='0' class='dlny' style='margin: 8px 0px 0px 0px;color:#fff'>
                    <tr>
           <td>
             <font size='2' color='white'>年份:</font><select onchange='ValueChanged(this)'>");
            foreach (int year in ViewData["YearData"] as List<int>)
            {
                if (year.ToString() == ViewData["selYear"].ToString())
                {
                    ViewContext.Writer.Write(@"  <option selected='selected' value=" + year + ">" + year + "</option> ");
                }
                else
                {
                    ViewContext.Writer.Write("   <option  value=" + year + ">" + year.ToString() + "</option> ");
                }
            }
            ViewContext.Writer.Write(@"</select></td>
                    </tr>
                </table></td><td width='30%' height='40' valign='top'></td>");

            ViewContext.Writer.Write(@"<td width='10%' align='right' valign='top' height='40'>");


            ViewContext.Writer.Write(@Html.DevExpress().Menu(ss =>
            {
                ss.Orientation = System.Web.UI.WebControls.Orientation.Horizontal;
                //  settings.Theme = ViewBag.Theme;
                ss.Name = "toolBarMenu";
               
             
               // ss.Styles.Style.BackColor = System.Drawing.Color.Black;
                ss.Height = System.Web.UI.WebControls.Unit.Pixel(40);
                ss.Width = System.Web.UI.WebControls.Unit.Pixel(75);
                ss.ShowPopOutImages = DefaultBoolean.False;
                ss.Styles.Style.Border.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(0);
                ss.Styles.Style.BorderTop.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(0);
             //   ss.Styles.Style.BackgroundImage.ImageUrl = EnterpriseFund.Common.OperateSession.compressurl(Url.Content("~/App_Themes/" + EnterpriseFund.Common.OperateSession.GetFromCacheRequest("CurrentUserTheme").ToString() + "/Web/mItemBack.gif"));
               ss.Styles.Style.BackgroundImage.ImageUrl = Html.ViewContext.Controller.ViewData["themepic"].ToString();
               // ss.Styles.Style.BackgroundImage.ImageUrl = Url.Content("~/App_Themes/" + EnterpriseFund.Common.OperateSession.GetFromCacheRequest("CurrentUserTheme").ToString() + "/Web/mItemBack2.gif");
             //  ss.Styles.Style.SeparatorBackgroundImage.ImageUrl = Html.ViewContext.Controller.ViewData["themepic"].ToString();
                    //= Url.Content("~/App_Themes/" + EnterpriseFund.Common.OperateSession.GetFromCacheRequest("CurrentUserTheme").ToString() + "/Web/mItemBack2.gif");
                ss.Styles.Style.GutterColor = System.Drawing.Color.Transparent;
                ss.Styles.Style.BackColor = System.Drawing.Color.Transparent;
                ss.Styles.Style.ForeColor = System.Drawing.Color.White;
                ss.EnableClientSideAPI = true;
             //   ss.Styles.Style.GutterBackgroundImage.ImageUrl = Html.ViewContext.Controller.ViewData["themepic"].ToString();
                ss.Styles.Style.Font.Size = System.Web.UI.WebControls.FontUnit.Point(10);
                ss.Styles.Style.Font.Name = System.Drawing.SystemFonts.DefaultFont.Name;
                ss.Styles.Style.Paddings.PaddingTop = System.Web.UI.WebControls.Unit.Pixel(0);
                //ss.Styles.Item.VerticalAlign = System.Web.UI.WebControls.VerticalAlign.Middle;
               
                var tmes = ss.Items.Add("主题", "tme1", Url.Content("~/Content/icons/ImageResource.png"));
                tmes.Image.Height = System.Web.UI.WebControls.Unit.Pixel(15);
                tmes.Image.Width = System.Web.UI.WebControls.Unit.Pixel(17);
               
                tmes.ItemStyle.VerticalAlign = System.Web.UI.WebControls.VerticalAlign.Middle;
                tmes.PopOutImage.Height = System.Web.UI.WebControls.Unit.Pixel(0);
                tmes.PopOutImage.Width = System.Web.UI.WebControls.Unit.Pixel(0);
                tmes.ItemStyle.BackgroundImage.ImageUrl = Html.ViewContext.Controller.ViewData["themepic"].ToString();
                tmes.ItemStyle.Border.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(0);
                tmes.ItemStyle.BorderTop.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(0);
                tmes.ItemStyle.BorderBottom.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(0);
                tmes.ItemStyle.BackColor = System.Drawing.Color.Transparent;
                tmes.ItemStyle.Paddings.PaddingTop = System.Web.UI.WebControls.Unit.Pixel(12);
               // tmes.ItemStyle.Paddings.PaddingBottom = System.Web.UI.WebControls.Unit.Pixel(0);
                tmes.ItemStyle.Height = System.Web.UI.WebControls.Unit.Pixel(40);
                //tmes.ItemStyle.Font.Size = System.Web.UI.WebControls.FontUnit.Point(10);
                tmes.ItemStyle.Font.Name = System.Drawing.SystemFonts.DefaultFont.Name;
                if ( ViewData["tmetable"] != null)
                {
                    foreach (System.Data.DataRow s in ( ViewData["tmetable"] as System.Data.DataTable).Rows )
                    {
                        tmes.Items.Add(item =>
                        {
                            item.Name = "theme";
                            item.Text = s["ThemeName"].ToString();
                           // item.ToolTip = s["CnName"].ToString();
                           // item.ItemStyle.BackgroundImage.ImageUrl = s.Value.ToString();
                           // item.ItemStyle.Paddings.PaddingTop = System.Web.UI.WebControls.Unit.Pixel(0);

                            item.Image.Url = Url.Content("~/Content/FunctionImages/" + s["ThemeName"].ToString() + ".png");
                            // item.ItemStyle.BackgroundImage.ImageUrl = Url.Content("~/Content/images/header01.jpg");
                            item.ItemStyle.ForeColor = System.Drawing.Color.Black;

                        });
                    }
                }
                ss.ClientSideEvents.ItemClick = "function(source,e){MenuTop_emClick(source,e)}";
                ss.ItemLinkMode = ItemLinkMode.ContentBounds;
            }).GetHtml());

            ViewContext.Writer.Write("</td>");
         ViewContext.Writer.Write(@"<td width='10%' align='right' valign='top' height='40'>
                <table width='178' align='right' cellpadding='0' cellspacing='0' class='dlny' style='margin: 9px 0px 0px 0px;color:#fff'>
                    <tr>
                        <td width='17' align='left'  >
                            <img src='" + Url.Content("~/Content/images/dlicon.jpg", true) + @"' width='17' height='17' />
                        </td>
                        <td width='75' align='left'   class='wi'>");
         ViewContext.Writer.Write(@Html.DevExpress().HyperLink(b =>
         {
             b.Name = "b1";
             b.Properties.Text = "桌面";
             b.Properties.Style.Font.Underline = false;
             b.Properties.Style.ForeColor = System.Drawing.Color.White;
             b.Properties.Style.Font.Name = System.Drawing.SystemFonts.DefaultFont.Name;
             b.NavigateUrl = "javascript:onClicks()";
         }).GetHtml());
                          ViewContext.Writer.Write(@"
                        </td>
                        <td width='17' align='left' >
                            <img src='" + Url.Content("~/Content/images/dlicon6.jpg", true) + @"' width='17' height='17' />
                        </td>
                        <td width='86' align='left'  >");
         ViewContext.Writer.Write(@Html.DevExpress().HyperLink(b =>
         {
             b.Name = "b2";
             b.Properties.Text = "退出";
             b.Properties.Style.Font.Underline = false;
             b.Properties.Style.ForeColor = System.Drawing.Color.White;
             b.Properties.Style.Font.Name = System.Drawing.SystemFonts.DefaultFont.Name;
             b.NavigateUrl = "javascript:LogExit()";
         }).GetHtml());
                           ViewContext.Writer.Write(@"
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>"

                                               );


        }

        );
    });





    settings.Panes.Add(pane =>
    {
        pane.Name = "Content";
        pane.PaneStyle.CssClass = "mainContentPane";
        pane.MinSize = System.Web.UI.WebControls.Unit.Pixel(375);
        pane.PaneStyle.BackColor = System.Drawing.Color.White;
        pane.PaneStyle.BorderBottom.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(1);
        pane.SetContent(@RenderBody().ToHtmlString());
    });

    settings.Panes.Add(pane =>
    {
        pane.Name = "Footer";
        pane.Size = System.Web.UI.WebControls.Unit.Pixel(31);
        pane.MinSize = System.Web.UI.WebControls.Unit.Pixel(31);
        pane.PaneStyle.CssClass = "footerPane";
       //  pane.PaneStyle.BackgroundImage.ImageUrl =  EnterpriseFund.Common.OperateSession.compressurl(Url.Content("~/App_Themes/"+EnterpriseFund.Common.OperateSession.GetFromCacheRequest("CurrentUserTheme").ToString()+"/Web/mItemBack.gif"));
         pane.PaneStyle.BackgroundImage.ImageUrl = Html.ViewContext.Controller.ViewData["themepic"].ToString();
        pane.SetContent(() =>
        {
            ViewContext.Writer.Write(@"<div border='false' style='overflow: hidden; height: 30px; line-height:30px;  color: Black; font-size:12px; font-family: Verdana, 微软雅黑,黑体'>
        &nbsp;&nbsp;&nbsp;&nbsp;<span style='background:url(" + Url.Content("~/Content/images/users.png") + @") no-repeat 0; padding-left:25px;'>"); ViewContext.Writer.Write(@Html.DevExpress().Label(st =>
                                     {
                                         st.Text = "当前部门：";
                                         st.ControlStyle.ForeColor = System.Drawing.Color.FromName(ViewData["ForeColor"].ToString());
                                     }).GetHtml());
            ViewContext.Writer.Write(@"</span><span style='font-weight:600; padding-right:15px; border-right: #999 1px solid; margin-right:10px;'>"); ViewContext.Writer.Write(@Html.DevExpress().Label(st =>
   {
       
          st.Text=ViewData["DeptName"].ToString();
          st.ControlStyle.Font.Bold = true;
          st.ControlStyle.ForeColor = System.Drawing.Color.FromName(ViewData["Color"].ToString());
   }).GetHtml()) ;
            ViewContext.Writer.Write(@"</span>
        <span style='background:url(" + Url.Content("~/Content/images/user_friend.png") + @") no-repeat 0; padding-left:25px;'>"); ViewContext.Writer.Write(@Html.DevExpress().Label(st =>
                                      {
                                          st.Text = "当前用户：";
                                          st.ControlStyle.ForeColor = System.Drawing.Color.FromName(ViewData["ForeColor"].ToString());
                                      }).GetHtml());
            ViewContext.Writer.Write(@"</span><span style='font-weight:600; padding-right:15px; border-right: #999 1px solid; margin-right:10px;'>"); ViewContext.Writer.Write(@Html.DevExpress().Label(st =>
   {
       st.ControlStyle.Font.Bold = true;
          st.Text=ViewData["EmpName"].ToString();
          st.ControlStyle.ForeColor = System.Drawing.Color.FromName(ViewData["Color"].ToString());
   }).GetHtml()) ;
            ViewContext.Writer.Write(@"</span>
        <span style='background:url(" + Url.Content("~/Content/images/history.png") + @") no-repeat 0; padding-left:25px;'>"); ViewContext.Writer.Write(@Html.DevExpress().Label(st =>
                                      {
                                          st.Text = "当前时间：";
                                          st.ControlStyle.ForeColor = System.Drawing.Color.FromName(ViewData["ForeColor"].ToString());
                                      }).GetHtml());
            ViewContext.Writer.Write(@"</span><span style='color:#09F; font-weight:600; padding-right:15px; border-right: #999 1px solid; margin-right:10px;'>"); ViewContext.Writer.Write(@Html.DevExpress().Label(st =>
   {
       st.ControlStyle.Font.Bold = true;
       st.Text = DateTime.Now.ToShortDateString();
       st.ControlStyle.ForeColor = System.Drawing.Color.FromName(ViewData["Color"].ToString());
   }).GetHtml()) ;
            ViewContext.Writer.Write(@"</span> 
        <span style='background:url(" + @Url.Content("~/Content/images/network.png") + @") no-repeat 0; padding-left:25px;'>"); ViewContext.Writer.Write(@Html.DevExpress().Label(st =>
                                      {
                                          st.Text = "登陆IP：";
                                          st.ControlStyle.ForeColor = System.Drawing.Color.FromName(ViewData["ForeColor"].ToString());
                                      }).GetHtml());
            ViewContext.Writer.Write(@"</span><span style='color:#09F; font-weight:600;'>"); ViewContext.Writer.Write(@Html.DevExpress().Label(st =>
   {
       st.ControlStyle.Font.Bold = true;
       st.Text = EnterpriseFund.Common.GenerateUtil.GetClientIPv4Address().ToString();
       st.ControlStyle.ForeColor = System.Drawing.Color.FromName(ViewData["Color"].ToString());
   }).GetHtml()) ;
            ViewContext.Writer.Write(@"</span>
    </div>");


        }

        );
    });

}).GetHtml()
 
</body>
</html>
